In conventional computer systems, a user initiates a powering down of the system by pressing an on/off switch. In response, the system is typically powered down by simply cutting power to the system. When power is removed from the system, the contents of registers and memory locations associated with the system's microprocessor and peripheral devices are generally lost. When power is later restored to power up the system, an initialization routine must be executed to place the system in a known initial state. In particular, any operating system and application programs that were running on the system prior to power down must be reloaded and restarted. Besides creating a long delay before the computer system is restored to its previous operating state, such conventional powering down can cause unsaved data associated with the operating system and/or application programs to be lost. This loss of data may result in a loss of some or all of the user's work product, and may even cause the computer system to crash or run improperly on the subsequent power up.
Portable computer systems such as laptops and notebooks comprise a quickly growing segment of the commercial market for computers. Portable computers are typically self-contained systems that can be operated on battery power in situations where the user does not have access to an AC power source (e.g., in an airplane or on a bus). System designers have been working to reduce the power consumption of portable computer systems in order to maximize the operating life of the system when running on battery power. In this regard, various techniques have been devised for reducing power consumption by manipulating clock signals and/or power supplies with respect to inactive circuit portions. Typically, a power management unit detects or predicts inactive circuit portions and accordingly turns off the clock signals that drive the inactive circuit portions in order to decrease the overall power consumption of the system. Similarly, the frequency of clock signals can be reduced during operations that are not time critical, and power can be removed from inactive circuit portions.
The Advanced Power Management (APM) system is a standardized power reduction system for use with personal computers. The definition of the APM standard can be found in "Advanced Power Management (APM) BIOS Interface Specification" (Rev. 1.2, February 1996), which is published by Intel Corporation (Santa Clara, Calif.) and Microsoft Corporation (Redmond, Wash.) and is herein incorporated by reference. Computer systems that operate in accordance with the APM standard allow the operating system to initiate idle calls to determine whether various application programs are busy or idle. In response to an idle call, each application program returns an idle indication to the operating system if it is idle. If all application programs running on the system return an idle indication, the operating system passes the all-idle indication to the system BIOS (Basic Input/Output System). The BIOS may then take power reduction steps such as reducing the frequencies of selected clock signals and/or removing power from selected inactive circuit portions. If any application program later becomes active, the system BIOS exits the reduced power state by causing the clock signals to return to their normal levels and/or power to be reapplied to the various circuit portions.
In more detail, the APM system defines four power management states: a normal operating state, a standby state, a suspend state, and an off state. The APM power management driver (APM driver) runs in the background (i.e., in the BIOS and the operating system) so it is transparent to the user. The portion of the APM driver in the operating system (APM OS driver) is present in operating systems such as the Windows 95.TM. operating system sold by Microsoft Corporation, and the portion of the APM driver in BIOS (APM BIOS driver) is provided by the system designer. The APM OS driver and the APM BIOS driver communicate with one another so as to operate together (i.e., as the APM driver) to control the computer's transition between the four APM states. Typically, state transitions are handled by the APM driver based on the states of a switch, a flag, an activity timer, a wake alarm, and/or a ring detector.
The normal operating state is virtually identical to the normal operating state of a computer system that does not perform power management. Likewise, the off state is virtually identical to the powered down state of a conventional computer system. In the off state, the power supply does not provide any power, and the state of the computer system prior to entering the off state is lost. In addition to the normal and off states, the APM standard defines two reduced power states--the standby and suspend states.
The standby state uses less power than the normal operating state, yet leaves any applications executing as they would otherwise execute. In general, power is conserved in the standby state by placing devices into low-power modes of operation (e.g., by ceasing the revolutions of the hard disk and by ceasing generation of the video signal). In contrast, when the computer system is in the suspend state, an extremely small amount of power is consumed. Such low power consumption is obtained by saving the state of the computer system to the hard drive and then turning "off" the power supply.
To enter the suspend state, the computer system must interrupt any executing code and transfer control to the APM driver, which ascertains the state of the computer system and writes the state to the hard disk (or RAM that does not lose power). In particular, the state of the CPU registers, the CPU cache, the system memory, the system cache, the video registers, the video memory, and the other devices' registers must all be saved to the hard disk. In other words, the entire state of the system is saved so that it can be restored without the executing application programs being adversely affected by the transition to suspend mode. The suspend condition is then indicated in non-volatile memory, and power is removed from the system. Thus, the state of the system is saved to the hard disk, system power is "off," and only a small amount of power is consumed by circuitry that monitors for events that cause the system to "wake-up" from the suspended state.
While such power management features have made portable computers more popular, many users desire a portable computer that has the same capabilities as a desktop computer. For such users, the expense of purchasing a second computer system for its portability, in addition to a fully functional desktop computer system, is difficult to justify. In effect, the user would own two nearly identical computer systems, only one of which is usually operating at a time. In order to provide a fully capable yet portable computer system, portable computers have been developed that can be coupled to a separate stationary unit. For example, the stationary unit may include features such as additional storage capacity (e.g., a large hard drive), additional display capabilities (e.g., a larger CRT display), and additional input capabilities (e.g., a larger keyboard). Such a stationary unit is known as a "docking station." The docking station usually is kept in one location and remains coupled to local area networks, the telephone system, peripherals, and an AC power source. After docking the portable computer, the user can access these resources.
In some conventional docking stations, the method of coupling the portable computer to the docking station uses a mechanical system (e.g., a latch system) that mates the computer and docking station. With such a station, undocking can be performed while an application is running on the system, but this will cause the system to crash and unsaved data to be lost. In more sophisticated docking stations, the portable computer and docking station are coupled together using a mechanically triggered electromechanical docking/undocking mechanism. This type of station increases the reliability of the interconnection through mechanical and electrical interlocks and prevents undocking in undesirable situations (e.g., when an application is running on the system).
While some conventional docking stations can lessen the chance of data loss by preventing undocking when the computer system is turned on, data may still be lost with such systems if the user powers down the system while the operating system is still running. In conventional systems, when the user presses the power switch, power is almost immediately removed from the computer system regardless of whether any software (i.e., operating system or application programs) is running on the system. Thus, unsaved data associated with the running operating system and application programs (e.g., the user's work product and important system data) can be lost. Further, saved data is typically stored in write buffers for a period before being written to disk, so the user may actually lose data that was believed to be saved. Similarly, if data is still being written to the disk when power is removed, the user's file may be corrupted and become unreadable. Additionally, conventional portable computer systems are powered down in the same manner when docked and undocked.